package com.webproject.controller;

import com.webproject.bean.Admin;
import com.webproject.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("Admin")
@CrossOrigin
public class Admincontroller {
    @Autowired
    AdminService adminService;
    @RequestMapping("list")
    public List<Admin> qetlist(){
        List<Admin> list=adminService.list();
        return list;
    }
}
